<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <title>设置快捷菜单</title>
    <link href="__STATIC__/component/pear/css/pear.css" rel="stylesheet"/>
    {include file='public/head.html'}
</head>
<body class="childrenBody {:dialog_css()}">
<form class="layui-form" action="{:url('work_menu')}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label layui-form-item-required">快捷菜单</label>
        <div class="layui-input-block">
            {:form_select('work_menu', $menu_list, $work_menu, 'xm-select="work_menu" xm-select-skin="normal"')}
        </div>
    </div>
    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="save">
                <i class="layui-icon layui-icon-ok"></i>
                设置
            </button>
        </div>
    </div>
</form>
<script src="__STATIC__/component/layui/layui.js"></script>
<script src="__STATIC__/component/pear/pear.js"></script>
<script>
    layui.use(['form', 'aphpForm', 'aphp'], function () {
        let form = layui.form;
        let $ = layui.$;
        let aphp = layui.aphp;
        let aphpForm = layui.aphpForm;

        aphpForm.bindEvent('form.layui-form'); // 渲染表单

        form.on('submit(save)', function (data) {
            aphp.request.postForm(data, 0, function () {
                parent.layer.close(parent.layer.getFrameIndex(window.name));
                parent.location.reload();
            });
            return false;
        });
    })
</script>
</body>
</html>